import {PaperType} from "@/types/mutations";

interface Machine {
    id: number;
    store_id: number;
    device_id: string;
    device_password: string;
    name: string;
    agent_id: number;
    created_at: string;
    updated_at: string;
}

interface PrinterItem {
    id: number;
    name: string;
    drivce_id: number;
    machine_id: number;
    store_id: number;
    MDL: string;
    a3_black_white_price: string;
    a3_color_price: string;
    a3_double_black_white_price: string;
    a3_double_color_price: string;
    a3_double_image_black_white_price: string;
    a3_double_image_color_price: string;
    a3_image_black_white_price: string;
    a3_image_color_price: string;
    a4_black_white_price: string;
    a4_color_price: string;
    a4_double_black_white_price: string;
    a4_double_color_price: string;
    a4_double_image_black_white_price: string;
    a4_double_image_color_price: string;
    a4_image_black_white_price: string;
    a4_image_color_price: string;
    created_at: string;
    drivce_name: string;
    driver_name: string;
    driver_type: number;
    hash_id: string;
    isPrinter: number;
    is_view: number;
    latitude: number;
    longitude: number;
    machine: Machine;
    paper_types_supported: PaperType[];
    photo_price: string;
    port: number;
    printer_name: string;
    printer_state: string;
    product: string;
    qr_code: string;
    qr_code_url: string;
    remaining_a3: number;
    remaining_a4: number;
    remaining_photo: number;
    species: number;
    support_status: number;
    supports_color: number;
    supports_double_side: number;
    supports_photo: number;
    toner: number;
    updated_at: string;
}

export interface PrinterInfo {
    printer_id?: number;
    name: string;
    latitude: number | null;
    longitude: number | null;
    paper_types_supported: PaperType[];
    supports_color: number | null,
    supports_double_side: number | null
}

interface deviceInfo {
    device_id: string | null,
    device_password: string | null
}

interface selectedPaperTypes {
    name: string;
}

interface selectedColorType {
    name: string;
    value: number;
}

interface selectedDoubleSideType {
    name: string;
    value: number;
}

interface PageData {
    testShowPopup: boolean;
    addPrinterShow: boolean;
    deviceInfo: deviceInfo;
    machineOnline: number;
    printerList: PrinterItem[];
    currentPrinterIndex: number;
    updatePrinterInfo: boolean;
    printerInfo: PrinterInfo;
    selectedPaperTypes: selectedPaperTypes[],
    selectedColor: selectedColorType[];
    selectedDoubleSide: selectedDoubleSideType[];
    clearPrinterTask: boolean;
    updatePrinterStatus: boolean;
    rebootDevice: boolean;
    tonerSettings: boolean;
    toner: number;
    paperSettings: boolean;
    remainingA4: number | null;
    remainingA3: number | null;
    canA3: boolean;
    printQRCode: boolean;
    noticeType: string | null;
    isNoticeCameIn: boolean;
}

export type {PrinterItem, Machine, PageData}
